package souralven.jcomicreader.util;

import java.text.MessageFormat;
import java.util.ResourceBundle;

public final class MessageUtil {

	private static final ResourceBundle BUNDLE = ResourceBundle.getBundle("i18n/messages");

	private MessageUtil() {
	}

	public static final String getMessage(final String key) {
		return BUNDLE.getString(key);
	}

	public static final String getMessage(final String key, Object[] parameters) {
		String message = BUNDLE.getString(key);
		return MessageFormat.format(message, parameters);
	}
}
